<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>留言内容</title>
	<link rel="stylesheet" href="layout.css">
</head>
<body>
	<?php 
		include_once("head.html");
		date_default_timezone_set('PRC');
		$str=trim(file_get_contents("message.txt"),"$");

		// 首先分割成每一句话  。
		$mess =explode('$',$str);

		//var_dump($mess);
	?>
	<!-- 显示留言内容 -->
	<div id="mess">
		<?php
			//foreach输出内容
			foreach ($mess as $key => $value) {
				$mess_per = explode('#',$value);
				echo $mess_per[3]."&nbsp;&nbsp;".$mess_per[0]."&nbsp;说：";
				echo $mess_per[1]."&nbsp;&nbsp;";
				echo date('Y-m-d H:i:s',$mess_per[2]);
				echo '<br>';		
			}
		?>
	</div>
</body>
</html>